#include <stdio.h>
#include <stdlib.h>

typedef int dataType;
typedef struct node{
  dataType data;
  struct node *next;
}node,*linklist;

void initList(linklist *l){
  *l = (linklist)malloc(sizeof(node));
  (*l)->next = NULL;
}
void insertEnd(linklist *l,dataType x){
  node *s=(linklist)malloc(sizeof(node));
  node *r;
  s->data=x;
  s->next=NULL;
  r=l;
  while(r->next!=NULL){
    r=r->next;
    }
    r->next=s;
}
int listLength(linklist l){
  node *r;
  r = l;
  int i = 0;
  while(r->next!=NULL){
    r=r->next;
    i++;
  }
  return i;
}
int main(){
  linklist *l,list;
  l=&list;
  initList(l);
  printf("链表初始化完成");
  }